Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Oct 29, 2025

This PR adds the following blocks as changes for #1516 👾 ✨

Category

  • slack-api-model (Slack API Data Models)

Reviewers

The following snippet might be interesting to use in testing:

var response = slack.methods().chatPostMessage(r -> r.token(token)
    .blocks(
        asBlocks(
            section(s -> s.text(plainText("Greetings!"))),
            contextActions(c -> c.
                elements(
                    asContextActionsElements(
                        feedbackButtons(b -> b
                            .positiveButton(
                                feedbackButton(a -> a
                                    .text(plainText(":+1:"))
                                    .value("+1")
                                )
                            )
                            .negativeButton(
                                feedbackButton(a -> a
                                    .text(plainText(":-1:"))
                                    .value("-1")
                                )
                            )
                        ),
                        iconButton(b -> b
                            .icon("trash")
                            .text(plainText("Remove"))
                            .confirm(
                                confirmationDialog(d -> d
                                    .title(plainText("Oops"))
                                    .text(plainText("This response might've been just alright..."))
                                    .style("danger")
                                )
                            )
                        )
                    )
                )
            )
        )
    )
    .channel("C0123456789"));

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@zimeg zimeg added this to the 1.46.0 milestone Oct 29, 2025
@zimeg zimeg self-assigned this Oct 29, 2025
@zimeg zimeg added enhancement M-T: A feature request for new functionality project:slack-api-model project:slack-api-model labels Oct 29, 2025
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 57.14286% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.89%. Comparing base (5e677f0) to head (49b52ee).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...il/json/GsonContextActionsBlockElementFactory.java 58.82% 6 Missing and 1 partial ⚠️
...rc/main/java/com/slack/api/model/block/Blocks.java 33.33% 2 Missing ⚠️
...m/slack/api/util/json/GsonBlockElementFactory.java 0.00% 2 Missing ⚠️
...om/slack/api/util/json/GsonLayoutBlockFactory.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1524      +/-   ##
============================================
- Coverage     72.94%   72.89%   -0.05%     
- Complexity     4406     4414       +8     
============================================
  Files           476      477       +1     
  Lines         14045    14073      +28     
  Branches       1472     1473       +1     
============================================
+ Hits          10245    10259      +14     
- Misses         2927     2939      +12     
- Partials        873      875       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@WilliamBergamin WilliamBergamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 💯

@zimeg zimeg modified the milestones: 1.46.0, 1.47.0 Nov 3, 2025
@zimeg
Copy link
Member Author

zimeg commented Nov 3, 2025

@WilliamBergamin I appreciate the kind reviews - will merge 🙏 ✨

@zimeg zimeg enabled auto-merge (squash) November 3, 2025 23:56
@zimeg zimeg merged commit b08ba12 into main Nov 4, 2025
6 checks passed
@zimeg zimeg deleted the zimeg-feat-model-context-actions-blocks branch November 4, 2025 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality project:slack-api-model project:slack-api-model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants